package com.ruijiang.controller.vm_service;


import com.ruijiang.controller.ApiPrefix;
import com.ruijiang.service.VmService.ChannelService;
import com.ruijiang.vo.channel.ChannelSkuVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(ApiPrefix.VM_SERVICE+"/channel")
@Slf4j
public class ChannelController {

    @Autowired
    private ChannelService channelService;

    @GetMapping("/channelList/{innerCode}")
    public List<ChannelSkuVO> getChannelList(@PathVariable String innerCode){
        log.info("获取售货机下的通道列表 {}",innerCode);
        return channelService.getChannelList(innerCode);
    }





}
